<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<script>
function Persion(name,age,gender){
    this.name=name;
    this.age=age;
    this.gender=gender;
}

Persion.prototype.toString = function(){
    return "Persion[name="+this.name+",age="+this.age+",gender="+this.gender+"]"
}


var per1 = new Persion("张三",18,"男");
var per2 = new Persion("李四",18,"男");

var result = per1.toString();
console.log(result)




</script>


</head>
<body>
    
</body>
</html>